

        <g:set var="entityName" value="${message(code: 'trainProgramme.label', default: 'TrainProgramme')}" />
            <g:form method="post" >
                <g:hiddenField name="id" value="${trainProgrammeInstance?.id}" />
                <g:hiddenField name="version" value="${trainProgrammeInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="school"><g:message code="trainProgramme.school.label" default="School" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'school', 'errors')}">
                                    <g:select name="school.id" class="select" from="${School.list()}" optionKey="id" value="${trainProgrammeInstance?.school?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="classes"><g:message code="trainProgramme.classes.label" default="Classes" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'classes', 'errors')}">
                                    <g:select name="classes.id" class="select" from="${Classes.list()}" optionKey="id" value="${trainProgrammeInstance?.classes?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="term"><g:message code="trainProgramme.term.label" default="Term" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'term', 'errors')}">
                                    <g:select name="term.id" class="select" from="${Term.list()}" optionKey="id" value="${trainProgrammeInstance?.term?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="description"><g:message code="trainProgramme.description.label" default="Description" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'description', 'errors')}">
                                    <g:textArea name="description" cols="40" rows="5" value="${trainProgrammeInstance?.description}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="course"><g:message code="trainProgramme.course.label" default="Course" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'course', 'errors')}">
                                    <g:textField name="course" maxlength="50" value="${trainProgrammeInstance?.course}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="startTime"><g:message code="trainProgramme.startTime.label" default="Start Time" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'startTime', 'errors')}">
                                    <g:datePicker name="startTime" class="select" precision="day" value="${trainProgrammeInstance?.startTime}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="teacher"><g:message code="trainProgramme.teacher.label" default="Teacher" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: trainProgrammeInstance, field: 'teacher', 'errors')}">
                                    <g:select name="teacher.id" class="select" from="${Teacher.list()}" optionKey="id" value="${trainProgrammeInstance?.teacher?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
